﻿namespace _030泛型_部分类_枚举_结构体_8枚举类型
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Person person = new Person();
            person.Level = Level.Manager;
            person.Skill = Skill.Cook| Skill.Drive|Skill.Program|Skill.Teach;
            Person boss = new Person();
            boss.Level = Level.BigBoss;

            Console.WriteLine(boss.Level > person.Level);
            Console.WriteLine((int)Level.Employee);
            Console.WriteLine((int)Level.Manager);
            Console.WriteLine((int)Level.Boss);
            Console.WriteLine((int)Level.BigBoss);

            Console.WriteLine((person.Skill &Skill.Cook)>0);
        }
    }
    enum Level
    {
        Employee = 1,
        Manager=2,            //101
        Boss = 4,
        BigBoss =8            //301
    }

    enum Skill
    {
        Drive,
        Cook,
        Program,
        Teach
    }


    class Person
    {
        public int ID { get; set; }
        public string Name { get; set; }

        public Level Level { get; set; }

        public Skill Skill { get; set; }
    }
}
